dsh-model-fix: Fix streaming finalization defects for opencode endpoints muse-spark and gpt-5.6-luna
`dsh-model-fix` is a DeepSeek Harness (DSH) plugin designed to fix an error that occurs at the end of streaming output when the aggregation endpoint fails to provide a `finish_reason` signal. By rewriting the ending state to `stop`, the plugin resolves compatibility issues with `muse-spark-1.2` and `gpt-5.6-luna`. Users can install it using the official command and enable it by configuring `modelPattern` and `providers` in `cordis.patch.yml`. Using this plugin does not require enabling the data training privacy switch, and it can effectively avoid unnecessary retries and token consumption.
Read Moredsh-finish-reason-patch: Streaming for OpenAI-Compatible Providers Without a Terminal finish_reason
This plugin aims to solve the problem of DSH aborting with an error while processing agent turns when an OpenAI-compatible gateway fails to return `finish_reason`. It hooks into the streaming response flow and rewrites specific error completion states as normal stop states, thereby supporting such gateway behavior while retaining other error-handling mechanisms. Installation requires manual configuration of `package.json` and adding dependencies, and the logic can be validated using a self-test script.
Read Moredsh-llm-finish-reason-tolerance: Properly terminating streaming responses missing the finish_reason
# Introduction When connecting OpenAI-compatible models to agents, there is a subtle yet critical compatibility issue: the streaming response from some gateways only pushes content deltas and end markers, without ever sending the `finish_reason` field. DSH's model client, pi-ai, classifies this stream as truncated ("Stream ended without finish_reason"), which the host then maps to a `TRANSPORT` error finish. The result is that while the content of every request is delivered intact, the turn ends in failure. A typical example is the Snowflake Cortex REST gateway (`*.snowflakecomputing.com/api/`)
Read More